package com.woniuxy.microsysserver.controller;

import com.woniuxy.common.bean.ResultMsg;
import com.woniuxy.microsysserver.bean.OptInfo;
import com.woniuxy.microsysserver.service.IOptService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("opt")
public class OptController {
    @Resource
    private IOptService optServiceImpl;

    @RequestMapping("/all")
    ResultMsg findAll(){

        List<OptInfo> all = optServiceImpl.FindAll();
        ResultMsg resultMsg = new ResultMsg(true);
        resultMsg.setData(all);
        return  resultMsg;
    }
}
